package Config

import (
	"github.com/spf13/viper"
)

type AppConfig struct {
	Mysql    Mysql
	VailDate VailDate
}

type Mysql struct {
	User     string
	Password string
	Host     string
	Port     string
	Database string
}
type VailDate struct {
	SecretId  string
	SecretKey string
}

var AppConf AppConfig

func ConfInit() {
	viper.SetConfigFile("../Config/app.yaml")
	viper.ReadInConfig()
	viper.Unmarshal(&AppConf)
}
